package com.powernode.controller;


import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.security.PublicKey;

//转发条界面用的
@Controller
@Api(tags = "路由的接口")
public class RouteController {

    //welcome是index.jsp架子里的首页内容，index.jsp相当于以前的丁老师的main.xml
    @RequestMapping("/page/welcome.do")
    public String welcome() {
        return "welcome";
    }

    //转发到注解界面  也就就是以前丁老师写的main.jsp
    @RequestMapping("/page/index.do")
    public String main() {
        return "index";
    }


    //转发到登录界面
    @RequestMapping("/page/toLogin.do")
    public String toLogin() {

        //  System.out.println("我是登录页面");
        return "login";
    }


    //跳转到用户管理
    @RequestMapping("page/toUserManager.do")
    public String toUserManager() {
        return "user/list";
    }


    //转发到客户管理界面中
    @RequestMapping("page/toKehuManager.do")
    public String toKehuManager() {
        return "customer/list";
    }


    //  由xxxx.jion文件请求而来
    @RequestMapping("/page/toUpdateUserPwd.do")
    public String toUpdateUserPwd() {
        //  System.out.println("我是转发到修改密码界面------------hahah");
//        转发到修改密码的页面
        return "/user/updatePwd";
    }
    //转发到修改头像页面

    @RequestMapping("page/toUpdateUserImg.do")
    public String toUpdateUserImg() {
        System.out.println("我是头像修改---------" + "../page/toUpdateUserImg.do");
        return "user/uploadImg";
    }

    //转发到拜访占比页面
    @RequestMapping("page/toStaManeger.do")
    public String toStaManeger() {
        return "stat/VisitLogStat";
    }


    //转发到公告页面
    @RequestMapping("page/toNoticeManager.do")
    public String toNoticeManager() {
        return "notice/list";
    }


}
